package com.diy.sigmund.diycommon.spring.extensionpoint.event;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextClosedEvent;
import org.springframework.stereotype.Component;

/**
 * @author ylm-sigmund
 * @since 2022/9/21 10:58
 */
@Component
public class CustomContextClosedEvent implements ApplicationListener<ContextClosedEvent> {

    private static final Logger log = LoggerFactory.getLogger(CustomContextClosedEvent.class);

    @Override
    public void onApplicationEvent(ContextClosedEvent event) {
        log.info("[CustomContextClosedEvent] onApplicationEvent");
        log.info("ContextClosedEvent:{}", event);
    }
}
